#include<stdio.h>
int main(int argc, char const *argv[])
{
    int n,count=0;
    printf("Enter Number:");
    scanf("%d",&n);
    do
    {
        if(n%2)
        {
            n=n*3+1;
            printf("[%d]:%d*3+1=%d\n",++count,(n-1)/3,n);
        }
        else
        {
            n/=2;
            printf("[%d]:%d/2=%d\n",++count,2*n,n);
        }
    } while (n!=1);
    
    return 0;
}
